using OpenFlashChartLib.Json;

namespace OpenFlashChartLib.Charts
{
    public class Scatter : Chart<ScatterValue>
    {
        private int? dotsize;

        public Scatter(string color, int? dotsize)
        {
            ChartType = "scatter";
            Colour = color;
            this.dotsize = dotsize;
        }

        [JsonProperty("dot-size")]
        public int? DotSize
        {
            get { return dotsize.Value; }
            set { dotsize = value; }
        }

        public override ILabelValue NewValue()
        {
            return new ScatterValue();
        }

        public override ILabelValue NewValue(string label, double value)
        {
            return new ScatterValue() {Label = label, Value = value};
        }
    }
}